]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Use createTimeLabel() where appropriate
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 25 Feb 2015 22:35:55 +0000 (23:35 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 4 Mar 2015 12:55:01 +0000 (13:55 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=745111

js/ui/calendar.js
js/ui/components/telepathyClient.js

index 04baceaf6683a6a9dc91ce08391c27bb3daf1213..721a08e06c4008a69e5332b96bf634bb5bffa3b1 100644 (file)
@@ -1574,10 +1574,10 @@ const NotificationSection = new Lang.Class({
     _onNotificationAdded: function(source, notification) {
         let message = new NotificationMessage(notification);
 
-        let time = Util.formatTime(new Date());
-        message.setSecondaryActor(new St.Label({ style_class: 'event-time',
-                                                 x_align: Clutter.ActorAlign.END,
-                                                 text: time }));
+        let timeLabel = Util.createTimeLabel(new Date());
+        timeLabel.style_class = 'event-time',
+        timeLabel.x_align = Clutter.ActorAlign.END;
+        message.setSecondaryActor(timeLabel);
 
         let isUrgent = notification.urgency == MessageTray.Urgency.CRITICAL;
         if (isUrgent) {
index f2d1e879b80c6fb4b1874cd13b6da97315882846..e6ade40220c4768a6915374e362d137447c56db1 100644 (file)
@@ -751,12 +751,10 @@ const ChatNotification = new Lang.Class({
         let lastMessageTime = this._history[0].time;
         let lastMessageDate = new Date(lastMessageTime * 1000);
 
-        let timeLabel = new St.Label({ text: Util.formatTime(lastMessageDate),
-                                       style_class: 'chat-meta-message',
-                                       x_expand: true,
-                                       y_expand: true,
-                                       x_align: Clutter.ActorAlign.END,
-                                       y_align: Clutter.ActorAlign.END });
+        let timeLabel = Util.createTimeLabel(lastMessageDate);
+        timeLabel.style_class = 'chat-meta-message';
+        timeLabel.x_expand = timeLabel.y_expand = true;
+        timeLabel.x_align = timeLabel.y_align = Clutter.ActorAlign.END;
 
         this._lastMessageBox.add_actor(timeLabel);